#include "progress.h"

void progress()
{
  char arr[max];
  char flag[] = {"/-\\|"};
  memset(arr, '\0', sizeof(arr));
  for(int i = 0; i < max - 1; i++)
  {
    arr[i] = '=';
    if(i != max - 2) arr[i + 1] = '>';
    //else arr[i] = '=';
    printf("加载中：[%-100s][%d%%][%c]\r", arr, i+1, flag[i % 4]);
    fflush(stdout);
    sleep(1);
  }
  //sleep(1);
}
